package com.xes.demo;

import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Service;

/**
 * @program: tal-scsdemo
 * @description:
 * @author: pkn
 * @create: 2020-06-22 16:15
 */

@Service
@EnableBinding(TalSink.class)
public class TalListenService {

    @StreamListener("input1")
    public void receiveInput1(Object reciverdMsg) {
        System.out.println("this is input1");
        System.out.println("Recived Msg: " + reciverdMsg);
    }

    @StreamListener("input2")
    public void receiveInput2(String reciverdMsg) {
        System.out.println("Recived Msg: " + reciverdMsg);
    }

}
